package com.qf.collection.collections;

import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;

/**
 * 演示集合工具类的用法
 */
public class Demo {
    public static void main(String[] args) {

        List<String> list = Arrays.asList("abc", "def123", "aaa12", "bbb1");
        System.out.println(list);
        Collections.reverse(list);
//        System.out.println(list);
//        Collections.shuffle(list);
//        Collections.sort(list, (o1, o2) -> o1.length()-o2.length());
        System.out.println(list);

    }
}
